<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="struts" uri="/struts-tags" %>
<html>
<head>
    <title>用户列表</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script language="javascript" src="${pageContext.request.contextPath}/OfficeAuto/script/jquery.js"></script>
    <script language="javascript" src="${pageContext.request.contextPath}/OfficeAuto/script/pageCommon.js"
            charset="utf-8"></script>
    <script language="javascript" src="${pageContext.request.contextPath}/OfficeAuto/script/PageUtils.js"
            charset="utf-8"></script>
    <link type="text/css" rel="stylesheet"
          href="${pageContext.request.contextPath}/OfficeAuto/style/blue/pageCommon.css"/>
    <script type="text/javascript">
    </script>
</head>
<body>

<div id="Title_bar">
    <div id="Title_bar_Head">
        <div id="Title_Head"></div>
        <div id="Title"><!--页面标题-->
            <img border="0" width="13" height="13"
                 src="${pageContext.request.contextPath}/OfficeAuto/style/images/title_arrow.gif"/> 用户管理
        </div>
        <div id="Title_End"></div>
    </div>
</div>

<div id="MainArea">
    <table cellspacing="0" cellpadding="0" class="TableStyle">

        <!-- 表头-->
        <thead>
        <tr align=center valign=middle id=TableTitle>
            <td width="100">登录名</td>
            <td width="100">姓名</td>
            <td width="100">所属部门</td>
            <td width="200">岗位</td>
            <td>备注</td>
            <td>相关操作</td>
        </tr>
        </thead>

        <!--显示数据列表-->
        <tbody id="TableData" class="dataContainer" datakey="userList">
        <struts:iterator value="list">
            <tr class="TableDetail1 template">
                <th>${userName}&nbsp;</th>
                <th>${name}&nbsp;</th>
                <th>${department.name}&nbsp;</th>
                <th>
                    <struts:iterator value="Role">
                        ${name}&nbsp;
                    </struts:iterator>&nbsp;</th>
                <th>${descriptment}&nbsp;</th>
                <th><struts:if test="#session.user.booleanPrivilege('用户删除')"><struts:a onClick="return delConfirm()"
                                                                                     href="user_delete!delete.do?parentId=%{id}">删除</struts:a></struts:if>
                    <struts:if test="#session.user.booleanPrivilege('用户修改')"><struts:a
                            href="user_editUi!edit.do?id=%{id}">修改</struts:a></struts:if>
                    <struts:if test="#session.user.booleanPrivilege('用户初始化密码')"><struts:a
                            href="user_initpassword!initpassword.do?parentId=%{id}"
                            onClick="return window.confirm('您确定要初始化密码为1234吗？')">初始化密码</struts:a></struts:if>
                </th>
            </tr>
        </struts:iterator>
        </tbody>
    </table>

    <%--分页--%>
    <%@include file="/OfficeAuto/BBS_Topic/page.jsp"%>
    <struts:form id="pageForm" action="user_list!findAll.do" theme="simple">
        <struts:hidden name="id"></struts:hidden>
    </struts:form>
    <struts:if test="#session.user.booleanPrivilege('用户添加')">
        <!-- 其他功能超链接 -->
        <div id="TableTail">
            <div id="TableTail_inside"><a href="user_addUi!addUi.do"><img
                    src="${pageContext.request.contextPath}/OfficeAuto/style/images/createNew.png"/></a>
                <a href="javascript:history.go(-1);"><img
                        src="${pageContext.request.contextPath}/OfficeAuto/style/images/goBack.png"/></a>
            </div>
        </div>
    </struts:if>
</div>

</body>
</html>
